<html>
<head><meta charset="utf-8"><title>running clippy tests in tree · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/running.20clippy.20tests.20in.20tree.html">running clippy tests in tree</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208575801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/running%20clippy%20tests%20in%20tree/near/208575801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/running.20clippy.20tests.20in.20tree.html#208575801">(Aug 31 2020 at 15:49)</a>:</h4>
<p>Is there a way to run Clippy tests from a <code>rust</code> checkout without needing to do a full bootstrap of the compiler?</p>



<a name="208576105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/running%20clippy%20tests%20in%20tree/near/208576105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/running.20clippy.20tests.20in.20tree.html#208576105">(Aug 31 2020 at 15:51)</a>:</h4>
<p><code>./x.py test src/tools/clippy --stage 0</code> <em>almost</em> does what I want, but it fails to actually run the tests</p>



<a name="208576194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/running%20clippy%20tests%20in%20tree/near/208576194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/running.20clippy.20tests.20in.20tree.html#208576194">(Aug 31 2020 at 15:52)</a>:</h4>
<div class="codehilite"><pre><span></span><code>test test_arg_value ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/compile_test-57f3d861c4ee043b

running 1 test
test compile_test ... FAILED

failures:

---- compile_test stdout ----
thread &#39;compile_test&#39; panicked at &#39;Found multiple rlibs for crate `serde`: `&quot;/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libserde-e4082e39a3778a0b.rlib&quot;` and `&quot;/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libserde-a1bfb255b57302c8.rlib&quot;&#39;, src/tools/clippy/tests/compile-test.rs:45:25
</code></pre></div>



<a name="208576488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/running%20clippy%20tests%20in%20tree/near/208576488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/running.20clippy.20tests.20in.20tree.html#208576488">(Aug 31 2020 at 15:54)</a>:</h4>
<p>how do Clippy developers normally do this?</p>



<a name="208578710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/running%20clippy%20tests%20in%20tree/near/208578710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/running.20clippy.20tests.20in.20tree.html#208578710">(Aug 31 2020 at 16:07)</a>:</h4>
<p>You are running into <a href="https://github.com/rust-lang/rust-clippy/issues/4015">https://github.com/rust-lang/rust-clippy/issues/4015</a><br>
For testing Clippy out-of-tree we have this workaround: <a href="https://github.com/rust-lang/rust-clippy/blob/09bd400243ed6f7059fedc0c1623aae3792521d6/tests/compile-test.rs#L53">https://github.com/rust-lang/rust-clippy/blob/09bd400243ed6f7059fedc0c1623aae3792521d6/tests/compile-test.rs#L53</a></p>



<a name="208608954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/running%20clippy%20tests%20in%20tree/near/208608954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/running.20clippy.20tests.20in.20tree.html#208608954">(Aug 31 2020 at 20:08)</a>:</h4>
<p>I'm pretty sure I tested it with <code>/x.py test src/tools/clippy --stage 2</code> and it worked (but stage 0 and 1 (default) didn't work).</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>